class Animail:

    def __init__(self, name, age):
        self.name = name
        self.__age = age

    def eat(self):
        print("在吃东西......")


class Cat(Animail):

    def __init__(self, name, age, hegih):  # 重写和继承父类__init__方法
        super(Cat, self).__init__(name, age)  # 第一种写法
        self.h = hegih

    def eat(self):
        # 执行父类的原来的逻辑代码  父类名.方法名(self)
        super().eat()  # Animail.eat(self)
        print("吃的是一条小鱼")

    def running(self):
        print('跑步')


xiaohua = Cat('小花', 3, 30)
# xiaohua.eat()
Animail.eat(xiaohua)
